package com.js.rtu.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.js.rtu.R;
import com.js.rtu.greendao.db.HistoryBean;
import com.js.rtu.greendao.db.HistoryInfoBean;

import java.util.List;

/**
 * 历史
 * Created by wz on 2021/6/28.
 */
public class HistoryDetailAdapter extends BaseQuickAdapter<HistoryBean, BaseViewHolder> {





    public HistoryDetailAdapter(List<HistoryBean> data) {
        super(R.layout.item_history_detail, data);
    }




    @Override
    protected void convert(BaseViewHolder helper, HistoryBean historyBean) {
        helper.setText(R.id.tv_id,historyBean.getPos()+"" );
        helper.setText(R.id.tv_time,historyBean.getStartTime()+"-"+historyBean.getEndTime() );
        helper.setText(R.id.tv_result,historyBean.getIsSuccess()?"成功":"无数据" );
        helper.setText(R.id.tv_msg,historyBean.getData());



    }


}
